<?php
require('../home/config.php');
$ipage = getValue('ipage','int','POST',0);
$db = new DBQuery;
$sql = 'SELECT sta_title, sta_content FROM static_page WHERE sta_id = ' . $ipage;
//Khai báo biến json
$array_json = array();
//lấy ra nội dung bài viết
$about_page = $db->LoadRow($sql);
foreach($about_page as $key=>$value){
    if($key == 'sta_title'){
        $key2 = 'title';
    }
    else{
        $key2 = 'content';
    }
    $array_json[$key2] = $value;
}
echo json_encode($array_json);
?>